﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace Nate_sRoguelikeGameXNA
{
    class GameDirection
    {
        public static Point East = new Point(1, 0);
        public static Point Southeast = new Point(1, 1);
        public static Point South = new Point(0, 1);
        public static Point Southwest = new Point(-1, 1);
        public static Point West = new Point(-1, 0);
        public static Point Northwest = new Point(-1, -1);
        public static Point North = new Point(0, -1);
        public static Point Northeast = new Point(1, -1);
        public static Point Nowhere = new Point(0, 0);

        public static Point GetDirection(Keys key)
        {
            switch (key)
            {
                case Keys.NumPad4:
                    return West;
                case Keys.NumPad7:
                    return Northwest;
                case Keys.NumPad8:
                    return North;
                case Keys.NumPad9:
                    return Northeast;
                case Keys.NumPad6:
                    return East;
                case Keys.NumPad3:
                    return Southeast;
                case Keys.NumPad2:
                    return South;
                case Keys.NumPad1:
                    return Southwest;
                default:
                    return Nowhere;
            }
        }

        //public static ConsoleKeyInfo PromptForDirection()
        //{
        //    return Utilities.GetInputKey(new Point(0, 0), "Which direction?", new[]
        //                                                  {
        //                                                      ConsoleKey.NumPad4,
        //                                                      ConsoleKey.NumPad7,
        //                                                      ConsoleKey.NumPad8,
        //                                                      ConsoleKey.NumPad9,
        //                                                      ConsoleKey.NumPad6,
        //                                                      ConsoleKey.NumPad3,
        //                                                      ConsoleKey.NumPad2,
        //                                                      ConsoleKey.NumPad1,
        //                                                      ConsoleKey.NumPad5,
        //                                                  });

        //}
    }
}
